package com.rd.student.jiaji.class1.wangyufang.day0801;

import java.util.Arrays;

public class ArrayTest1 {
    public static void main(String[] args) {
        int[] array = new int[]{1, 3, 5, 7, 9, 11, 13, 15, 17};
        int[] array1 = Arrays.copyOf(array, 5);
        int[] array2 = new int[3];
        int[] array3 = new int[array.length];
        System.arraycopy(array, 6, array2, 0, 3);
        for (int i = 0; i < array1.length; i++) {
            System.arraycopy(array1, 0, array3, 0, 5);
        }
        for (int i = 0; i < array2.length; i++) {
            System.arraycopy(array2, 0, array3, 5, 3);
        }
        System.out.println(Arrays.toString(array3));
    }
}
